package com.demo.controller;

import com.demo.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * Created by IntelliJ IDEA.
 * User: zm
 * Date: 2023/2/26
 */
@Controller
public class BeanScopesController {

    @Autowired
    private User user1;

    public User getUser1(){
        User user = user1;
        System.out.println("Bean 原 Name："+ user.getName());
        user.setName("李四");
        return user;
    }
}
